<div class="main-content">
  <!-- Header -->
  <div class="header bg-gradient-primary py-7 py-lg-8 pt-lg-9">
    <div class="container">
      <div class="header-body text-center mb-7">
        <div class="row justify-content-center">
          <div class="col-xl-5 col-lg-6 col-md-8 px-5">
            <h1 class="text-white">创建帐户</h1>
            <p class="text-lead text-white">{{.setting.register_page_html | htmlencode}}</p>
          </div>
        </div>
      </div>
    </div>
    <div class="separator separator-bottom separator-skew zindex-100">
      <svg x="0" y="0" viewBox="0 0 2560 100" preserveAspectRatio="none" version="1.1" xmlns="http://www.w3.org/2000/svg">
        <polygon class="fill-default" points="2560 0 2560 100 0 100"></polygon>
      </svg>
    </div>
  </div>
  <!-- Page content -->
  <div class="container mt--8 pb-5">
    <!-- Table -->
    <div class="row justify-content-center">
      <div class="col-lg-6 col-md-8">
        <div class="card bg-secondary border-0">
          <div class="card-body px-lg-5 py-lg-5">
            <div class="text-center text-muted mb-4">
              <small>注册账号</small>
            </div>
            <form role="/register" method="post" id="registrationForm" name="registrationForm">
              <div class="form-group">
                <div class="input-group input-group-merge input-group-alternative mb-3">
                  <div class="input-group-prepend">
                    <span class="input-group-text"><i class="ni ni-hat-3"></i></span>
                  </div>
                  <input class="form-control" placeholder="账号" type="text" name="UserName" required autofocus minlength="6" maxlength="20">
                </div>
              </div>
              
              <div class="form-group">
                <div class="input-group input-group-merge input-group-alternative">
                  <div class="input-group-prepend">
                    <span class="input-group-text"><i class="ni ni-lock-circle-open"></i></span>
                  </div>
                  <input class="form-control" placeholder="密码" type="password" name="Passwd" required minlength="6" maxlength="20">
                </div>
              </div>

              <div class="form-group">
                <div class="input-group input-group-merge input-group-alternative">
                  <div class="input-group-prepend">
                    <span class="input-group-text"><i class="ni ni-lock-circle-open"></i></span>
                  </div>
                  <input class="form-control" placeholder="确定密码" type="password" cname="Passwd" required minlength="6" maxlength="20">
                </div>
              </div>

              <div class="form-group">
                <div class="input-group input-group-merge input-group-alternative mb-3">
                  <div class="input-group-prepend">
                    <span class="input-group-text"><i class="ni ni-curved-next"></i></span>
                  </div>
                  <input class="form-control" placeholder="邀请码（没有也可注册）" type="text" name="CommissionCode" value="{{.code}}" >
                </div>
              </div>

              <div class="form-group">
                <div class="input-group input-group-merge input-group-alternative">
                  <div class="input-group-prepend">
                    <span class="input-group-text"><i class="ni ni-image"></i></span>
                  </div>
                  <input type="hidden" id="captchaID" name="Id" >
                  <input class="form-control" placeholder="验证码" type="text" name="VerifyValue" required>
                  <img id="captchaImg" src="" alt="" onclick="getCaptcha()">
                </div>
              </div>

              <!-- <div class="text-muted font-italic"><small>password strength: <span class="text-success font-weight-700">strong</span></small></div> -->
              <div class="row my-4">
                <div class="col-12">
                  <div class="custom-control custom-control-alternative custom-checkbox">
                    <input class="custom-control-input" id="customCheckRegister" type="checkbox" required>
                    <label class="custom-control-label" for="customCheckRegister">
                      <span class="text-muted">我同意 <a href="{{.setting.agreement_url}}" target="_blank">使用协议</a></span>
                    </label>
                  </div>
                </div>
              </div>
              <div class="text-center">
                <button type="button" onclick="register()" class="btn btn-primary mt-4">注册</button>
              </div>
            </form>
          </div>
        </div>
        <div class="row mt-3">
          <div class="col-6">
            <a href="#" class="text-light" onclick="alert('未支持密码找回')"><small>忘记密码?</small></a>
          </div>
          <div class="col-6 text-right">
            <a href="/login" class="text-light"><small>登录</small></a>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>